﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;

namespace SRPCENTRIA
{
    public class BasePage : System.Web.UI.Page
    {
        public void EscribirScript(string msg) 
        {
            //ClientScript.RegisterClientScriptBlock(Type.GetType("String") , "Mensaje", "alert('" + msg + "');", true);
            ClientScript.RegisterClientScriptBlock(Page.GetType(), Guid.NewGuid().ToString(), "alert('" + msg + "');", true);
        }

        public void EscribirScriptManager(string msg)
        {
            //ClientScript.RegisterClientScriptBlock(Type.GetType("String") , "Mensaje", "alert('" + msg + "');", true);
            ScriptManager.RegisterClientScriptBlock(this,Page.GetType(), Guid.NewGuid().ToString(), "alert('" + msg + "');", true);
        }

        public void ScriptRedirect(string msg, string solicitud)
        {
            //ClientScript.RegisterClientScriptBlock(Type.GetType("String") , "Mensaje", "alert('" + msg + "');", true);
            ClientScript.RegisterClientScriptBlock(Page.GetType(), Guid.NewGuid().ToString(), "alert('" + msg + "'); window.location.href='wBusqProveedor.aspx?solicitud=" + solicitud + "';", true);
            //Response.Redirect("wBusqProveedor.aspx?solicitud=" + Constanst.Solicitud_AdjuntarArchivo);
        }

       
    }
}